Hello statalists,
Please, I would like to create a placebo with my dataset below.
I wish to do two exercises: 1) reassign sales from a random date (for the same city) and
2) random city (for the same date).
I wish to run each randomization 500 times.
Could anyone give me a suggestion, please?
Many thanks!
Please, I would like to create a placebo with my dataset below.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(firm city date sales) 1 1 1 100 2 2 1 120 3 2 1 111 4 3 1 90 5 4 1 250 6 4 1 123 7 5 1 345 8 5 1 199 9 6 1 90 10 7 1 98 1 1 2 178 2 2 2 300 3 2 2 210 4 3 2 229 5 4 2 567 6 4 2 897 7 5 2 200 8 5 2 90 9 6 2 10 10 7 2 100 end
2) random city (for the same date).
I wish to run each randomization 500 times.
Could anyone give me a suggestion, please?
Many thanks!
Comment